home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / mallcrawl.swf / scripts / __Packages / BrokenToys.as < prev    next >
Encoding:
Text File  |  2007-09-28  |  798 b   |  31 lines

  1. class BrokenToys extends MovieClip
  2. {
  3.    var available_to_hit;
  4.    var HitSquare;
  5.    var HitOver;
  6.    function BrokenToys()
  7.    {
  8.       super();
  9.       this.available_to_hit = true;
  10.    }
  11.    function onEnterFrame()
  12.    {
  13.       if(!_global.Rescuer.invincible)
  14.       {
  15.          if(this.HitSquare.hitTest(_global.Rescuer) && this.available_to_hit)
  16.          {
  17.             _global.Rescuer.loseFollower();
  18.             this.available_to_hit = false;
  19.          }
  20.          else if(!this.HitSquare.hitTest(_global.Rescuer) && !this.available_to_hit)
  21.          {
  22.             this.available_to_hit = true;
  23.          }
  24.          if(!this.HitSquare.hitTest(_global.Rescuer) && this.HitOver.hitTest(_global.Rescuer))
  25.          {
  26.             _global.Footer.addScore(2);
  27.          }
  28.       }
  29.    }
  30. }
  31.